-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Extension traits #2812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension traits #2812
Conversation
767976e
to
8a1673c
Compare
9ad9fa7
to
9b50d50
Compare
9b50d50
to
408962c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good!
src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I only have a couple of minor comments, but on the whole I like it :)
src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/extending-foreign-types.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Show resolved
Hide resolved
…nding-foreign-types.md Co-authored-by: Dmitri Gribenko <[email protected]>
…od-resolution-conflicts.md Co-authored-by: Dmitri Gribenko <[email protected]>
…od-resolution-conflicts.md Co-authored-by: Dmitri Gribenko <[email protected]>
…od-resolution-conflicts.md Co-authored-by: Dmitri Gribenko <[email protected]>
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might want to change the examples in this section to not be on &str
, since implementing a trait on a reference leads to confusing behavior around method resolution (which I talk about in more detail in one of the comments here). I think things would be less confusing if we used a non-reference type like i32
or struct Foo
.
src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/method-resolution-conflicts.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me. The note below is stylistic and relates only to the speaker notes, so feel free to treat it as a mild preference at most.
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/extending-other-traits.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Outdated
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Show resolved
Hide resolved
@LukeMathWalker I left another round of comments, but please don't be discouraged - this section looks very good and the comments are mostly minor. Please work through resolving the comments, rebase the PR to resolve conflicts with main, and merge. You have my LGTM. |
Co-authored-by: Dmitri Gribenko <[email protected]> Co-authored-by: Nicole L <[email protected]>
6808057
to
6902906
Compare
6902906
to
a0146cc
Compare
src/idiomatic/leveraging-the-type-system/extension-traits/should-i-define-an-extension-trait.md
Show resolved
Hide resolved
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Show resolved
Hide resolved
Co-authored-by: Dmitri Gribenko <[email protected]>
src/idiomatic/leveraging-the-type-system/extension-traits/trait-method-conflicts.md
Outdated
Show resolved
Hide resolved
…t-method-conflicts.md Co-authored-by: Dmitri Gribenko <[email protected]>
No description provided.